<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base target="_self">
    <title>修改幼儿园</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="修改,幼儿园">
	<meta http-equiv="description" content="This is my page">

	<style type="text/css">
	</style>

  </head>
  
  <body>
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<jsp:include page="/jsp/outward/business/common/menuLink.jsp">
    			<jsp:param name="menuLink" value="[{'name':'公共管理'},{'name':'幼儿园管理'},{'name':'修改幼儿园'}]"/>
    			<jsp:param name="width" value="70%"/>
    		</jsp:include>
    		
    		<s:hidden name="kindergarten.id"></s:hidden>
    		
    		<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC">
    			<tr bgcolor="#FFFFFF">
    				<td width="20%" align="right" class="label">
    					幼儿园名称：
    					<br>
    					<font color="red">(20字以内)</font>
    				</td>
    				<td width="80%" align="left">
    					<s:textfield name="kindergarten.kgName" id="kgName" cssStyle="width:90%" maxlength="20"></s:textfield>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					编码：
    					<br>
    					<font color="red">(20字以内)</font>
    				</td>
    				<td align="left">
    					<s:textfield name="kindergarten.kgCode" id="kgCode" cssStyle="width:90%" maxlength="20"></s:textfield>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					地址：
    					<br>
    					<font color="red">(50字以内)</font>
    				</td>
    				<td align="left">
    					<s:textfield name="kindergarten.address" id="address" cssStyle="width:90%" maxlength="50"></s:textfield>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					电话：
    					<br>
    					<font color="red">(50字以内)</font>
    				</td>
    				<td align="left">
    					<s:textfield name="kindergarten.telephone" id="telephone" cssStyle="width:90%" maxlength="50"></s:textfield>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					建园日期：
    				</td>
    				<td align="left">
    					<input name="kindergarten.createTime" id="createTime" type="text" style="width:120px" class="WDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="<s:date name='kindergarten.createTime' format='yyyy-MM-dd'/>" />
    				</td>
    			</tr>
    		</table>
    		
    		<table width="100%" cellspacing="0">
    			<tr>
    				<td align="center" valign="bottom" height="30">
    					<input type="button" value="修改" class="btn" onclick="updateKindergarten()" />
    				</td>
    			</tr>
    		</table>
    		
    		
    	</s:form>
    </center>
    
    <script type="text/javascript">
    function updateKindergarten()
    {
    	var kgName = $('#kgName');
    	var kgCode = $('#kgCode');
    	var address = $('#address');
    	var telephone = $('#telephone');
    	if(!isNotNull(kgName.val()))
    	{
    		showMsg('幼儿园名称不能为空。', function(){kgName.focus();});
    		return;
    	}
    	if(!isNotNull(kgCode.val()))
    	{
    		showMsg('编码不能为空。', function(){kgCode.focus();});
    		return;
    	}
    	if(!isNotNull(address.val()))
    	{
    		showMsg('地址不能为空。', function(){address.focus();});
    		return;
    	}
    	var url = 'inner/common/updateKindergarten.action';
    	ajaxAction(url, 'post', 'frm', false, function(){
    		window.opener.searchThis();
    		window.close();
    	});
    }
    </script>
  </body>
</html>
